function [alp,zeta_p,iota_p,del,ups,Bigphi,s2,h,ppsi,nu_l,zeta_w,iota_w,law,laf,betil,Rstarn,psi1,psi2,psi3,pistar,sigmac,rho,epsp,epsw,...
    gam,Lmean,Lstar,gstar,rho_g,rho_b,rho_mu,rho_z,rho_laf,rho_law,rho_rm,...
    sig_g,sig_b,sig_mu,sig_z,sig_laf,sig_law,sig_rm,eta_gz,eta_laf,eta_law,...
    zstar,rstar,rkstar,wstar,nu_log,cstar,kstar,kbarstar,istar,ystar,p,s_c,tstar,betag,etabet,bgstar] = getpara00_8032(para)
  
alp = para(1);
zeta_p = para(2);
iota_p = para(3);
del = .025;
ups = 1;%exp(para(4)/100);%maybe take out para(5)fix 0
Bigphi = para(5);
s2 = para(6);
h = para(7);
ppsi = para(8);
nu_l = para(9);
zeta_w = para(10);
iota_w = para(11);
law = 1.5;
laf = [];
betag  = 1/(1+para(12)/100);
psi1 = para(13);
psi2 = para(14);
psi3 = para(15);
pistar = (para(16)/100)+1;
sigmac = para(17);

%%%%%%%%%% note change
sigmac = 1; %%##

rho = para(18);

% additional paramters specific to BY
p=para(19);
bgystar= 4*para(20);  %%## government debt over gdp st st (quarterly)

epsp = 10;
epsw = 10;


npara = 20; 


%% exogenous processes - level

gam = para(npara+1)/100;
Lmean = para(npara+2);
gstar = .18;

npara = npara+2;

%% exogenous processes - autocorrelation

rho_g = para(npara+1);
rho_b = para(npara+2);
rho_mu = para(npara+3);
rho_z = para(npara+4);
rho_laf = para(npara+5);
rho_law = para(npara+6);
rho_rm = para(npara+7);

npara = npara+7;    


%% exogenous processes - standard deviation

sig_g = para(npara+1);
sig_b = para(npara+2);
sig_mu = para(npara+3);
sig_z = para(npara+4);
sig_laf = para(npara+5);
sig_law = para(npara+6);
sig_rm = para(npara+7);

eta_gz = para(npara+8);
eta_laf = para(npara+9);
eta_law = para(npara+10);

npara = npara+10;


%% Parameters (implicit) -- from steady state

Lstar = nu_l/(1+nu_l);    %%## this is important -- 1-leisure

zstar = log(gam+1)+(alp/(1-alp))*log(ups); 

%%% find fixed point for betil
nu_log0 =    0.7626;
s_c0 = 20;
etabet0 = (1 + p * (1-betag*(1-p)) * s_c0/( (1-p)*(1+nu_log0)*(1-h*exp(-zstar)) ) )^(-1);
betil0 = etabet0*betag;
betil = fsolve(@(betil) betilfix(betil,betag,p,h,sigmac,zstar,1,ups,del,alp,Bigphi,Lstar,gam,gstar,pistar,bgystar),betil0);


rstar = (1/betil)*exp(sigmac*zstar);

Rstarn = 100*(rstar*pistar-1);

rkstar = rstar*ups - (1-del);

wstar = (alp^(alp)*(1-alp)^(1-alp)*rkstar^(-alp)/Bigphi)^(1/(1-alp));



kstar = (alp/(1-alp))*wstar*Lstar/rkstar;

kbarstar = kstar*(gam+1)*ups^(1/(1-alp));

istar = kbarstar*( 1-((1-del)/((gam+1)*ups^(1/(1-alp)))) );

ystar = (kstar^alp)*(Lstar^(1-alp))/Bigphi;
if ystar <= 0

    disp([alp,  betil, kstar,Lstar])
    dm([ystar,Lstar,kstar,Bigphi])

end
cstar = (1-gstar)*ystar - istar;

%% new stuff
nu_log = wstar*(1-Lstar)/( cstar*(1-h*exp(-zstar)) ); %%##

bgstar = bgystar*ystar;

tstar = ystar*gstar + (1-(1/rstar)*exp(zstar))*(exp(zstar)/pistar)*bgstar;  %%##

s_c = (cstar-wstar*Lstar+tstar)/((1-betil)*cstar); %%##

%[betag  (1 + p*s_c/( (1-p)*(1+nu_log)*(1-h*exp(-zstar)) ) )*betil/( 1 + p*s_c*betil/((1+nu_log)*(1-h*exp(-zstar))) )]

etabet = (1 + p * (1-betag*(1-p)) * s_c/( (1-p)*(1+nu_log)*(1-h*exp(-zstar)) ) )^(-1);

if betag*(1-p) >= 1
 warning('betag*(1-p) >= 1');
end

%wl_c = (wstar*Lstar/cstar)/law;
